﻿using OhioState.Graphics.Proxy;

namespace OhioState.Graphics
{
    /// <summary>
    /// Delegate for rendering a scene 
    /// </summary>
    /// <param name="panel">render panel</param>
    public delegate void RenderScene(IRenderPanel panel);
    /// <summary>
    /// RenderPanel Contexts
    /// </summary>
    public interface IRenderPanel
    {
        /// <summary>
        /// SetBackground color
        /// </summary>
        /// <param name="red">red</param>
        /// <param name="green">green</param>
        /// <param name="blue">blue</param>
        void SetBackgroundColor(float red, float green, float blue);
        /// <summary>
        /// Get the Frame Count
        /// </summary>
        int FrameCount { get; }
        /// <summary>
        /// Get Set Accessor for updating frame counter
        /// </summary>
        bool UpdateFrameCounter { get; set; }
        /// <summary>
        /// Get Width of the panel
        /// </summary>
        int Width { get; }
        /// <summary>
        /// Get Height of the panel
        /// </summary>
        int Height { get; }

        /// <summary>
        /// Get the resource
        /// </summary>
        IRenderResourceManager ResourceManager { get; }
        /// <summary>
        /// Invalidate the panel
        /// </summary>
        void Invalidate();
        /// <summary>
        /// Compile shader routine
        /// </summary>
        /// <param name="routine">routine to be compiled</param>
        /// <returns>true or false</returns>
        bool Compile(ShaderRoutine routine);
        /// <summary>
        /// Link the shader program
        /// </summary>
        /// <param name="program">shader program to be linked</param>
        /// <returns>true or false</returns>
        bool Link(ShaderProgram program);
        event RenderScene renderScene;
    }
}
